define(["app"],
        function (app) {
            return app.run([
                    '$rootScope',
                    '$state',
                    '$stateParams',
                    function ($rootScope, $state, $stateParams) {
                        $rootScope.$state = $state;
                        $rootScope.$stateParams = $stateParams
                  
                    }
                ])
                .config(function ($stateProvider, $urlRouterProvider, $locationProvider, $uiViewScrollProvider, cfpLoadingBarProvider) {
                   cfpLoadingBarProvider.spinnerTemplate = '<div><span class="fa fa-spinner">Loading...</div>';
                  //用于改变state时跳至顶部
                    $uiViewScrollProvider.useAnchorScroll();
                    // 默认进入先重定向
                    var accordtionState = {
                        name : 'accordtion',
                        url : '/accordtion',
                        templateUrl : 'views/accordtion.html'
                    }
                    // 容器管理模板
                    var containerState = {
                        name : 'container',
                        url : '/container',
                        templateUrl : 'views/containerManage.html'
                    }
                    $urlRouterProvider.otherwise('/accordtion');
                    $stateProvider.state(accordtionState);
                    $stateProvider.state(containerState);
                        
                })
        })